This application is related to our copending patent application entitled xe2x80x9cMETHOD AND APPARATUS FOR DYNAMIC MANAGEMENT OF TRANSLATED CODE BLOCKS IN DYNAMIC OBJECT CODE TRANSLATIONxe2x80x9d, filed of even date herewith, and assigned to the assignee hereof.
This application is related to our copending patent application entitled xe2x80x9cSTORAGE STRUCTURE FOR DYNAMIC MANAGEMENT OF TRANSLATED CODE BLOCKS IN DYNAMIC OBJECT CODE TRANSLATIONxe2x80x9d, filed of even date herewith, and assigned to the assignee hereof.
The present invention generally relates to computer system emulation, and more specifically to dynamic management of translated code in dynamic object code translation.
The cost of designing a computer processor continues to increase. Some computer architectures thus ultimately become uneconomical to implement directly, despite these architectures having significant installed bases.
One solution to this problem is to simulate (or emulate) one computer architecture on another computer architecture. Herein, the simulating (or emulating) computer architecture will be termed the xe2x80x9cHostxe2x80x9d computer system, while the simulated (or emulated) computer architecture will be termed the xe2x80x9cTargetxe2x80x9d computer system. Emulators have been available almost since the advent of the first compilers.
The traditional technique employed for Target system emulation or simulation is to interpret the Target system code. One disadvantage of interpreting Target system code is that of performance. In particular, in a typical emulation, many Target instructions will be executed a great number of times. It can be quite inefficient to repeatedly decode the same Target system instructions just to execute the same Host system instructions in response to that Target instruction decode.
One of the techniques developed to deal with that disadvantage is termed xe2x80x9cDynamic Object Code Translationxe2x80x9d (or xe2x80x9cDOCTxe2x80x9d). When DOCT is utilized, the Target system code is dynamically translated to Host instructions. The Host instructions are then stored for fixture execution whenever the corresponding Target instruction or instructions are to be executed.
There is an adage or rule in computer science that 10% of the code does 90% of the work. One result of this rule when applied to Target system emulation is that most of the Target system instructions actually emulated constitute a small percentage of the actual Target system code. DOCT utilizes resources that could otherwise be dedicated to interpreting Target system instructions. Thus, in many cases it is more efficient overall to only perform DOCT on selected high-usage portions of Target system code, and to interpret the remaining Target system code.
Recent prior art is replete with different methodologies for optimizing the point at which DOCT is performed. One published solution is termed xe2x80x9cHot Spotxe2x80x9d determination.
Special problems arise in systems implementing DOCT to emulate Target system code when the word size of the Host computer differs from the word size of the Target computer system. Another problem that arises when implementing DOCT for some Target systems is that Target system code and data are difficult, if not impossible, to differentiate when dealing with Target system object code. Another problem is the necessity in some Target system architectures to support self-modifying code. Another problem is the necessity in some Target system architectures to support dynamic code overlays.
It would thus be advantageous to be able to have an architecture and methodology for supporting different word size DOCT emulation, dynamic identification of instructions, self-modifying code, and dynamic code overlays.